package com.cloud.securityoauth2client1.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
public class IndexController {



    @GetMapping("success")
    public String getCurrentUser() {
        return "authentication";
    }

    @GetMapping("user")
    public Principal user(Principal principal) {
        return principal;
    }



}
